Fix error with cursor format getting reset when sending chat message