Fixed a lot of build-script bugs