Implemented chat decoding (fixed connection crash).