rundir and links fix