Fixed bugs in SimplSockets and cache host bucket ordering