Fixes and leaks