Trying to fix reboot loop in APM code in second loader stage.