Fix output formatting bug