Fix cgi bug