fix for OSX

cast row size explicitly as UINT for std::min comparison