Fix incorrect type assignment