Fix more memory leaks