Fixed urllib compatability issues