various int->size_t fixes