Fixed check on cpathlen