Added quit and restart command, fixed self.flag_restarting crash