Changing query to fix issues with country names having spaces