Fixed bootloader macro and stage ordering bugs.