Fixed an error when a select statment filters the resultant fields