fix buffer overflow when sync without reader connected