fixed accidental memory leak