Fix for http://hub.qgis.org/issues/9020
Merge pull request #1432 from gvellut/master

Fix #9020