add casts to suppress warnings.