Fix for leaks