fix #669
fix #698
Merge branch 'master' of github.com:AIFDR/inasafe