Fix expired token check