Remove the static casts