Fixing limiting the query to work for query as well as limit.