Fixed bug in output function