Fixed a bug, there was a crash when nothing should be deleted