Added a few casts from zint to double/int where appropriate.