solved the bug of models