Add casts to OpenAES function use to fix the last remaining warnings