Correct a bug caused by incorrect initialization of a model object

Fix bug caused by passing model object instead of constant
Merge pull request #4 from mascott/fix-bug

Fix bug caused by passing model object instead of constant.