solve cast patch script