Patches to get proper functionality with modified DDD and zero leaks