Fix upgrade issue from 4.0 – #2623