Fix flicker restoring view state