revert memory leak