[#1404] fix type punning issue