fix some int/size_t mismatches