fix memtrying to fix  leak