fixing error pagination