Fix the ping validation

Ping was always failing due to missing negation of the condition being checked.