fix sync record condition