fix memory leak problems..