Fix bug during query execution with selected fields.