Fixed issue where an error code was not returned on failure to sync.