ClassCastException fixed