Fixed GCC warning on narrowing conversion
Merge pull request #2408 from sergey-shambir/gcc_warning

Fixed GCC warning on narrowing conversion