Fix BUG #1022
Update model.c
Merge pull request #1026 from dreamsxin/bug_1022

Fix Bug #1022