Fixed bug in class Plugin.