fix some Meory Leaks