Fixed bug in computeExpiry().