Minor fixes

This fixes some minor issues I came across in the process of doing other work.