fixes
fixed memory leak
fixed more memory leaks