fix some synchronization issues