Fixes checkWorldEdges.