keepalive code was causing a crash. fixed it.