On the design of a fault compensation algorithm for consensus networks