Change port configuration and improve {undo_action}