viewWillAppear bug fix