Fix crash when using string model name