Fixed memory leak.