Fixed to make it work under OSX
Merge branch 'master' into develop