fix #32: discard does not remove errors