fixed issue with multiple new line characters