Minor bugfix on select query generation
(missing a space)