fix patch script