fix some floating point stuff for graphs