fix bug in rollback