Fix metrics leak
Fix certificate leak

There were a leak when doing TLS in server mode