fixEntireMap seems correct now, needs testing