simplified logic for reboot, before was always forcing a reboot