Fix to avoid "orphans" sticking over the edge.