Fixes to the dql parser, select was not working as expected