trying to disconnect handlers where needed to avoid memory leaks