fix leak local variable