Fixed the connection checking, which was always saying connected to the internet.