Revert some code to working state