Fix Bugs in Model