Fixed various outputs for json compatibility