I've fixed the try-finally blocks here.