Update to work with nested paths.