Changed remaining double casts to intValue() calls