close curl handlers