Move the hostname change command to the top of the sequence and add set host name by command.