[FastCgi] Fix various bugs