Eliminate compiler warnings on 32-bit systems

Add type casting to eliminate some compiler warnings on 32-bit systems