improved error rendering, added wrap-internal-error