Fix bug where expiry is always null