Remove ClassCastException.