modified a bug when retrieving empty dataset