Fix ClassCastException in OMSC