Fix bug caused by nameless, empty paths