remove additional unnecessary casts