Fix use of previously deallocated EmergeManager