fix prepare output