fixed memory leaks 'n stuff