issue #864 and some minor fixes
Merge branch 'hotfixes' into develop