Changed chat code

Back to what it was by "Chat Application" commit