fix cgi

Additional fix to #425