reduce number of double/int type mismatches

nothing special, just added int()