Pagination and 'check_state' method fixed