Fixed bug in output type function.