fix bug with reinit of plugin