fixed some bugs of LoadModel