remove a bug in the new output function