Changed condition to ping