Updated stats tracking and fixed curl errors