Compatibility and upgrade fixes