bug fixes, mostly about consensus