Fixed bugs in daos, data models