fix a cleanpath non-pointer exception bug.