Fixed the bug on creating a Model.