Some fixes to the model

Ref #12