BUG: Fix crash when pressing clear button on latest Slicer versions