Updated hostname handling.