fixed double query