Fixing bug in tokens record