Fixes to the models. The references addition broke things.