fixes for Chat sample