retrieve main sm
fix test
Merge pull request #129 from basz/fix/controller-plugin-factory

retrieve main sm