bug with writeIntX & floats, fixed js loop