fix disconnect bug where data from last connection would remain