Fix isPage issue