sync fix, logging fix, npe fix