removed a lot of stuff, simplifed the application, now chat is working fine