Fix more garbage collection bugs.