fix bug and change build script