fixing the double free\! hurray\!