Added missing error code reset.