Fixes for qml support

The one in hookutils.py was a show stopper.