Fix small possible crash issue
If the application is opened without the module being enabled, it will crash on shutdown. It's not serious since the app is already beeing closed, but crashes does not look good.