Fix sending duplicate messages after logoff