fix a mistake with GC collection
Fixes #1