check for the node to be alive before running beforedisconnect
merge