REALLY fixed rebuild script