fixed bug in output formatter