fix patch for libmgf