further improved chat window behavior

fixed a typo, hid chat errors, improved code readability