fix for #740 caused by floating pt rounding err in js