ClassCastException repaired