Various fixes for chat and synchronization