Fixed when selecting the same attribute more than once; Fixed selector for query