Fixed variable call memory leaks