avoid setting paging[] at negative value