Fixed errors in build script