Fix bug causing early cookie expiration.