Fix incorrect type of variable