Fixed spacing issue in query generator.