Fix bugs in producing simple error witness