fix #224 float truncation overflow

fix for #224