Fix #494
Fix #489
Merge branch 'fix-git-errors' into develop