fixed crashes when midi is used anywhere else in the app