fix  end url check