fix issue when application.pluginManager is undefined