Fix conversion error in legacy sync script