Added a few (zint)->(int) casts