memdebug improvements