fix upgrade cgi-script