Fixed warnings for 64-bit

Fixed `Implicit conversion loses integer precision: 'long' to 'int'`