Changed how out of range for end page works