refs #4126 invalidate token only in case of success, otherwise it is not possible to correct an invalid number