Bug fix in model relationships.