Proper joining of paths