tweak rebuild script