fix chat var not defined