fixed some problems with the data model changes
some more fixes for data model changes