fix the d_make_root bug