Fixed bugs in DeformModel