Fixed bug in current page managing