Changed viewDidAppear to viewWillAppear. Also call super properly.