this should fix the floating point problems