Fixed a bug with longs and ints