fix the leaks