Not able to delete dataset in the gui

I had a misspelled dataset under /mnt/trunk/app-data/immich/
that I wanted to delete. I couldn’t it in the GUI in TrueNAS.
I deleted the dataset manually using rm under the shell.
But now TrueNAS still shows the dataset in the GUI.
When want to delete it here I get the following message:

Error deleting dataset trunk/app_data/immich/immich_backup.
[EBUSY] Failed to delete dataset: cannot destroy ‘trunk/app_data/immich/immich_backup’: dataset is busy

I just unset the app-pool under configuration and then was able to delete the wrong dataset.
After deleting the dataset I selected the pool again.