fix paging direction