Fix two bugs: in Dataset and AdaptativeDatabase