Upgrade bug fix