Fixing a bug in how the expiration time is determined.