fixed typo
consolidated sync.set error handling