Remove unnecessary cast.