Fix LWC ClassCastException