cleanup excess newlines in result display