Memory leak

Fixed some memory leaks