fix non-ajax pagination