Fix unload plugin exception problem