Fixing some synchronization issues