Minor bugfixes to chat