Small 'correctness' fixes (thx to sparse)