Fixed some issues with the output