fix NoMethodError when mongodb is enabled without a cluster