try to handle memory leak problem