Remove three unnecessary casts