Added safeguard when plugin is disabled.