More tweaks to make sure everything works on both systems. Shout out to the socket module.