fTools fix

fixes http://hub.qgis.org/issues/7298 and http://hub.qgis.org/issues/8241