Fixed bug caused by float32/64 misalignment. Also added array bounds checking on diagnostic publishing