more leaks fixed (in export)