fix dataloader with inheritance