Fixed a few more cast warnings that got missed the first time around.