Fix: properly cleanup CURL (Thanks Luis Tomas!)