Added -L to curl for redirect