ClassCastException solved