fixed exit crash (ViewState should terminate ahead of the view)