fixing some memory leaks