improve ping and alive checks