added better support for deleting plugins