Solve some bugs of expiry feature and usage.