On edit delete correctly the attachment when it is removed