Fix a small type assignment bug