[SD Communication] bug fix in output stream