Fix boot logic