Fixed issues with the select statement