fix a bug in rebuild script.