avoid ClassCastException