Make visualisation delete button behave correctly