fix issue in curl implementation