working around a GC collection issue