Fixes and upgrades