fixes issue with es combining queries