Fixes errors in upgrade-kernel.sh