bugfix to sh_write. null buffer caused when I removed cmd_quotes and didn’t look closely