Fix SQLite and MongoDB test failures (#293)