Fix problem where helper overlays were created beyond the bounds.