Fixed more memory leaks