Revert changes on put and post