explicit (int) casts

added explicit int casts to prevent warnings when compiling for 64 bit.
Merge pull request #7 from kudit/patch-1

explicit (int) casts