fix return error on ping failure