bug fix when removing token