modified standard cud for bug in setIndex