fix freeze on multiple setViews, close #2521, close #2236, close #2485