removed potential memory leak