Fixed rebuild script