error state improvements (uncompiled)

This reverts commit feefb992454fd554328f6e6d074a0fb54d1f2dc0.
compiled