Fixed bug caused by failed revert.