fixed possible garbage collection problem