Fix model attributes being collection data

Add a test to prevent the regression.
Use a more meaningful variable name modelAttributes.

Fixes #58