fix lastpage selected