fixes #23, but curl returns error code 7 after a few thousand requests