Fix regression about line endings during sync (fixes #102)