fixed object to int casts.