Fix GC problem in testing