fixed pathname validation