fixed a warning with comapring size_t to int