Fix mode for opening datasets