fixed revert commit function