Removed space leaks