Fix issue with QML variable declaration