Fix initial ping and add some better handling.