More robust midi in port creation and deletion