Fix for behavioral bugs after changing a view controller.