Changed to support MongoDB.