Fixed incorrect result of rootpage determination