Fix setting the hostname to '$NAME' rather than its value