Consensus algorithms provide an elegant distributed way for computing the average of a set of measurements across a sensor network. However, the convergence of the node estimates to the global average depends on the timely and reliable exchange of the measurements to neighboring sensors. These assumptions are violated in practice due to random packet losses, causing the estimated average to be biased. In this paper we present and analyze a practical consensus protocol that overcomes these difficulties and assures convergence to the correct average. Simulation results show that the proposed corrective consensus has ten times less overhead to reach the same level of accuracy as the one achieved by a variant of standard consensus that uses retransmissions to (partially) overcome the negative effects of packet losses. In networks with more severe packet loss rates, corrective consensus is more than forty times more accurate than standard consensus that uses retransmissions. More importantl...