fixed memory leak in feature reader