Fixed: missing static_cast for enum conversion