Minor fixes and upgrades