Fixed a warning regarding conversion from double to int.