Fixed warnings about int64 to int32 conversion