gallery items correctly deleted when folders are removed