token expire check bug fix