Fixed bug in repair on tokens.