fix GC crashes