Fix unassign variable and don't remove unexisting path