fixed bug in model assignments