little changes to sync manager.c