Fix names in query