Fixed bug with long queries that remained after replaced restkit to requests

This bug could be found only for query results longer than 200 1000 records for me.
Limits are now higher than last year and it was not easy to find this bug by tests.

I rebased the fix to your current master in order to work with Travis.