Fixed plugin initialization during startup. Fixes #1195