fixed bug

fixed select statement