Correct a bug with integer division instead of double.