Get rid of a few redundant explicit casts