fix cgi bug