Fix CustomScript extension test bug