fixed stuff with garbage collection