Fixed bug in liveness handling