casted one arg to size_t to band-aid precision error