Fixing the model attach
Merge pull request #822 from wfgomes/patch-2

Fixing the model attach