Fix index file issue when output buffering is disabled on the server