Fix `ClassCastException` in `ScalaMeterFramework` class.