Fixed assert during QML shutdown