repair copy script