Add timeout on synchronization and updates. Also fix some bugs