Performance optimization

Fix constant creation of unnecessary threads when plugin installed.