fix a bug in outputbuilder