fix the time out error and change the ping checking method