Fix loop conditions since it now includes SLOT_SYNC_DIR. #1343