scripts patch fixed