Fix cmd in scalar context appends a newline