Fixed a bug with long values (note: integer values still only work up to long - might need to use BigInteger soon).