fix printing remote shell commands output