beautify errors