fixed current memory leaks