Fix broken expired check