few little modifications to make chat working as expected