Fixed bugs that caused the app to crash when changing schedule views.