Make voting work - mostly.

Signed-off-by: Paul Brook <paul@nowt.org>