[MAT-180] Use static_casts, attempt type fixup