fixing expiration bug