attempt at fixing http://hub.qgis.org/issues/9184