Fix SQLITE_ERROR when where:{} is used