fix for key expire check