Fixed memory leak in reader destructor