Fixed a problem will be cause when php output_buffer = on