some fixes to domain model