Improve plugin init