Fixed crash bug.
Added subplugin loaded check.