Make sure we don't pass the maximum Y position