Fix references in model