fix for zero length paths