Fix commands issue and correct Logger reference on disconnect.