Fixed simplifyPaths bug.