Rename gotoPage to gotoPageByNumber

Without this fix, the public gotoPage() function was being called in an infinite loop instead of calling the private gotoPage() function.