fix: Restores the original type

It allows to restore the original type of the card if the user deletes the code