[Task #2797]: fixed plugin init

@pamval please review
This comment is relevant - it should be left on the code.