Fix hostname resolving