fixed bug in sync class