Remove some useless castings

Sorry I couldn't resist.