Fix global leak