fix so text/plain errors get rendered properly