Small fixes from Chicago and MIT

See commit titles.

Also I want to include 61c8022b153bade0a9b6319c1fef96454f834c1e, but it's in MIT's branch, and I have no idea how many fixes ended up in MIT's branch without making it to main, so someone who knows and has opinions would be better set up to decide whether a merge or a cherry-picking spree would be more appropriate.