Added explicit limit usage.
This fixes the issue where 'LIMIT 0' was being used when the limit wasn't set