fix the symlink and unlink bugs