After a bit of troubleshooting, I think the problem might be with AVG, and/or some security issue with Windows.