Fix test segfault on osx
Merge branch 'develop' into develop.macosx