Fix possible memory leak #2