Fixed bug when a newly added plugin removed immediately