Fixed nullpointerexception bug when resume syncing.