fix if output buffering is turned off