fTools fixes

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