fixed more leaks - #588