A few casts to make Clang happy.