Fixed a number of errors in the build script
Merge branch 'hotfix/0.0.6'