Undo move of setState() in setViewState()