Fixing some missing casts.