Fixed bad rounding in setting length of trace