minor bug fixed in garbage collection