Fixed bug in get_expiry.