Better handling of nested paths