Make ping parsing more robust