Removed the unneeded castings.