undo setState modifications