Try to fix line outside of the polygon bounds