fixed a bug concearning addition of columns from WHERE that were already selected