fix iteration returning wrong chromosome at chromosome boundaries