Added missing int casts