Yet more little fixes found in debugging