fix for http://hub.qgis.org/issues/9515