Remove redundant casts.