Fix reversion functionality