fix bug which would cause curl to be incorrectly used