Small fixes

Just a few tiny fixes that address things that better testing should have caught...