fix booking query