fixed some memory leaks, some remaining ...