don't mix up int and size_t (first pass to fix that)

There is a problem with 64bits system