Correcting limit being applied to non-lookup queries