fixed sync bug when killing cli at the same time as focusing cli