fixed #201

now initializing the plugin even if the plugin is not called in any stage so it keeps track of it's background/foreground status.