changed scope of plugin variables