refactor reboot_node and fix typo