small fixes
fcgi code refactoring