Fix issue with config not being applied when querying with limit and offset