fix exception when bad page number given