A set of small fixes found while code reviewing