fixed the annoying selection problem on page button click