bug fix for unloadViews