Fix some issues with error rendering