Fix how server name is determined