Closes paths