Fix missing query qualifier on select