fix failing test caused by ClassCastException