handle dbic optional dependencies properly