fixing bugs in obj initialization for data model