Keepalive made more robust.