Fix patch file code