Rework the fcgi code a bit.