fix exit value
Merge branch 'master' into portable