Fix some memory leaks
--