Add more spacing support to queries