Missing space in generated query