Fixed bug on format output