Merge WingWei repack's code