fixed reboot bugs