Fixed an issue with index queries containing spaces.