fixed bug where error wire was overwritten with empty array