Fix 4417

Fix #4417, please see http://hub.qgis.org/issues/4417

I think that http://hub.qgis.org/issues/6514 is a duplicate of 4417.

Thanks in advance