add conditional check for plugins