Account for spaces in query