remove old application's view if necessary