Fixed problem on simultaneous queries