fixes #204 getModelInstance() object to string

See issue #204 for description of the issue, basically in enterprise a model was getting passed in some cases instead of a string.

Recreated pull request as per instructions in readme, forked from dev and merge to dev, see closed pull request 205 for more info.