added some reset of variables on disconnect