fix format when output is an objects