fix isValid
fix isValid and rewrite path.arc