Fixed some conversion issues of size_type to int by explict (int) casting vector::size