Fixed bug where too many entries in database had file system as parent