Fixes incorrect GC bug