Bug upgrade doctrine fix