fix a problem with entry iteration