Fix bug where query only included the first word