fixed broken remote query