Fixed qml switching seg fault.