Fix the pageAppear method.