Fixed a bug with paging events