Fix bug with MLS queries