[FIX] fix problem when discarding text after error (I hope, really)