Fixed upgrade code not being executed

Fixed upgrade code not being executed.