Fixes issue with newlines not being removed