small fixes and clean-ups