fixes global leak