Fix global scope leak