Re-add doT - global leaks fixed

//cc @olado