deep bug related to issue #659
Merge branch 'hotfixes' into develop