another series of small fixes