Fix a problem with empty paths