a few upgrade fixes