Correctly join paths