Fix #864.
Fix failing tests.
Fix failing test and green dot.
Merge pull request #881 from akbargumbira/inasafe-864

Fix  #864