fix for QGIS 2.2