FIXED: hang on shutdown if minting was stopped befor by locking the wallet