bug fix in error formatting