Fixed counting on rollback