fixed select statment