Small bugfix in garbage collector