Fix rounding issues with Firefox.