Fixed garbage collection problem