Changed around the query order to hopefully make gmaps more effecient on heroku