Fixing variable type assignments: some ints should have been doubles