Fix crash on minimize + reactivate