fixed typo in withErrors

Bug introduced in #246.