removed more int casts