fix js build script issues