Fix leaked task class.