warning fix: add self-consitency check to remove warning