regenerate script fixes