We need to access "fields" as well before getting the $path.

Thanks to Dave B!