fix sync and connect issues