fixed the comparison between size_t and int.