fix insertion of a zero length path