fixed a case where newlines are in the output