Fix #904

- This PR addresses #904
- All tests on safe_qgis are passing except this one: ```test_function_options_dialog.test_buildWidget``` which is not related to this. That failing test is related to https://github.com/AIFDR/inasafe/issues/903 and this one https://github.com/AIFDR/inasafe/commit/5aac8cf9dac5f3ce9c6da9873da43044d937cb0e#commitcomment-5773351