#33: Fixed ClassCastException, converted other similar usages