Fixing bug for platforms with 64bit device IDs, and seeding rand for server selection