Correct a bug caused by incorrect initialization of a model object

Fix bug caused by passing model object instead of constant