Get rid of unnecessary cast