Fixed an error where a slave cannot become alive to a master in a cluster

The error was caused by a race in alive msg and fail msg handling procedure.