Hostname fixes

Makes us less sensitive to hostname issues (like the ones we see with selinux), and improves reliability.