read_properties: use size_t instead of int for callback