sync with original xtcp