fix error from sqlite3 to mongodb