Fix api change breaking tests