don't use deprecated functions
fix urequest-related bugs