fixed curl call to follow redirects