Close a couple of leaking resources

Change-Id: I1d2e4f6d4f07ad25152559304a5b5f414c0c6893