Removes unnecessary cast to .