Fixing some memory leaks
Fixing fixes