Fix bug when delete plugin