Fixed missing static_casts