Fixed memory leak program.