Some fixes for handling limit, page and errors