Fix of token losing handling