fixes #945

I could not cherry pick from master because of newline conflicts on
entire file, oops