Fix multiplying before double cast.