Fixed a memory issue in GetModelName