add minor GC code