fix leak problem