Fix bug DNN-3133: close the data reader after using it.