correct test for optional dependencies