Null pointer fixed in chat