Removed warning caused by calling std::min<int> with size_t values
Merge pull request #813 from ChuckRozhon/min_warning

Removed warning caused by calling std::min<int> with size_t values