patches script fix