fix combined query