Fix incorrect math id assignation