Fix the upgrade compiling