fixed page selection bug