Added timeout mechanism for 2PC.
Fixed voting mechanism.