fix output errors, catch broken messages