Fix crash if deleting sos plugin