fix disconnect fn