Rollback dist function