Fix model and domain problemns