fixed a bug with newlines not becoming spaces