Fix for rounding bug