fixed dataset switch bug