Plugin update

refined clean-up process