fixed leaks and numbers of parents and children generated