Fixing map traversal to be correct.