fix port syncing bug