Fixes to get chat.html working