Changed the way lat and long are compared.