replaced some ints by int32_t