Make sync somewhat more robust against network issues