Fix for leaking Task