Implemented plugin destructor.