Sundry small fixes