Repaired middleware context.model assign