Wash log-washing and fix a few bugs along the way