Removes unnecessary cast