Update Util.cs

Remove unneeded casts.