bug fix in output