restore memdebug, accidentally broken