improve alive check