Mini-fixes

Wondered if you needed any help rebasing and upstreaming this stuff.