Use `static_cast` (also in several other places)