fixes to Select statement grammar