Portability fix
Merge branch 'portability_fix' into develop