several trivial fixes