Fix Ttl & getMaxAge

Fix ttl when getMaxAge is equal to 0