fix some bugs with installing legacy kernel